home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
turbot1.arc
/
PROG7.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-08-15
|
1KB
|
42 lines
PROGRAM PROG7;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: REPEAT statement
CHAR data type
}
VAR
Response : Char;
Correct_Response : Boolean;
BEGIN
WriteLn('Turbo Pascal seems to ');
WriteLn;
WriteLn('A. Run faster than other Pascals.');
WriteLn('B. Compile faster than others.');
WriteLn('C. Take less room in memory.');
WriteLn('D. All of the above.');
WriteLn;
REPEAT
Write('Enter your choice - A, B, C, or D: ');
ReadLn(Response);
WriteLn;
If (Response = 'D') or (Response = 'd')
THEN
Correct_Response := True
ELSE
Correct_Response := False;
If Correct_Response
THEN
WriteLn('Right!')
ELSE
WriteLn('Wrong choice, try again.');
UNTIL Correct_Response;
END.